//
//  BQAccountManager.m
//  BeeQuick
//
//  Created by Asun on 2017/7/9.
//  Copyright © 2017年 BecomeRich. All rights reserved.
//

#import "BQAccountManager.h"

@implementation BQAccountManager


+ (BQAccountManager *)sharedInstance{
    
    static BQAccountManager *__instance__;
    
    static dispatch_once_t onceToken;
    
    dispatch_once(&onceToken, ^{
        __instance__ = [BQAccountManager new];
        
        __instance__.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", @"text/html", nil];
        
        __instance__.requestSerializer = [AFJSONRequestSerializer serializer];
        
    });
    return  __instance__;
    
}


- (void)POSTWithUrlString:(NSString *)urlString parameters:(id)parameters success:(void (^)(id))successBlock failure:(void (^)(NSError *))failureBlock{
    
    [self POSTWithUrlString:urlString parameters:nil success:^(id responseObject) {
        if (successBlock) {
            successBlock(responseObject);
        }
    } failure:^(NSError *error) {
        if (failureBlock) {
            failureBlock(error);
        }
    }];
    
    
}

@end
